<template>
	<view class="">
		<view v-if="i == 0"
			class=" colllect_item u-padding-30 u-flex u-row-between u-margin-left-30 u-margin-right-30 u-margin-top-15 u-margin-bottom-25"
			:id="'colllect'+item.id" v-for="(item , index) in colllect_list" :key='index'>
			<view class="u-flex-col  u-row-center u-col-center">
				<u-avatar :show-level='item.vips == 1' level-bg-color='red' :src="item.avatarUrl" mode="circle"
					:size='120'></u-avatar>
				<text class=" u-font-33 u-main-color oneLine-noWrap" style="width: 120rpx;text-align: center;" >{{item.nickname}}</text>
			</view>
			<text class="u-padding-left-15 u-padding-right-25 u-font-33 u-main-color">添加时间：{{item.add_time}}</text>
		</view> 

		<view v-if="i == 1"
			class=" colllect_item u-padding-30 u-flex u-row-between u-margin-left-30 u-margin-right-30 u-margin-top-15 u-margin-bottom-25"
			:id="'colllect'+item.id" v-for="(item , index) in colllect_list" :key='index'>
			<view class="u-flex-col u-row-center u-col-center">
				<view class="u-font-33 u-main-color u-flex u-margin-bottom-10 u-margin-top-5 u-row-left"
					style="width: 100%;">
					<text class="bill_label">账单金额：</text>
					<text class="bill_num">+{{item.bill}}</text>
				</view>
				<view class="u-font-33 u-main-color u-flex u-margin-bottom-10 u-margin-top-5 u-row-left"
					style="width: 100%;">
					<text class="bill_label">下单时间：</text>
					<text>{{item.add_time}}</text>
				</view>
				<view class="u-font-33 u-main-color u-flex u-margin-bottom-10 u-margin-top-5 u-row-left"
					style="width: 100%;">
					<text class="bill_label">下单人：</text>
					<text>{{item.user_name}}</text>
				</view>
			</view>
		</view>
		
		<view v-if="i == 2"
			class=" colllect_item u-padding-30 u-flex u-row-between u-margin-left-30 u-margin-right-30 u-margin-top-15 u-margin-bottom-25"
			:id="'colllect'+item.id" v-for="(item , index) in colllect_list" :key='index'>
			<view class="u-flex-col  u-row-center u-col-center">
				<u-avatar :show-level='item.user_info.vips == 1' level-bg-color='red' :src="item.user_info.avatarUrl" mode="circle"
					:size='120'></u-avatar>
				<text class=" u-font-33 u-main-color oneLine-noWrap" style="width: 120rpx;text-align: center;" >{{item.user_info.nickname}}</text>
			</view>
			<view class="u-padding-left-15 u-padding-right-0 u-font-33 u-main-color u-flex-col ">
				<text>分销比例：{{item.sale_scale}} %</text>
				<text class="u-margin-top-10">添加时间：{{item.add_time}}</text>
			</view>
		</view> 
		
	</view>
</template>

<script>
	export default {
		name: 'Item',
		data() {
			return {
				
			}
		},
		methods: {
			goto_details_2(item) {
				this.$u.route({
					url: 'pages/article/index',
					params: {
						id: item.id,
					}
				})
			},
			goto_details(item) {
				this.$u.route({
					url: 'pages/roomDetails/index',
					params: {
						id: item.id,
					}
				})
			},
		},
		props: {
			i: { // 当前tab的下标 
				type: Number,
				default () {
					return 0
				}
			},
			colllect_list: {
				type: Array,
				default: () => []
			}
		}
	}
</script>

<style lang='scss' scoped>
	.bill_label {
		width: 200rpx;
	}

	.bill_num {
		font-size: 40rpx;
		color: #F55C23;
	}

	.strategy_title {
		font-weight: 700;
		font-size: 32rpx;
	}

	.colllect_item {
		box-shadow: 0rpx 0rpx 14rpx 0rpx #999;
		background-color: #FFFFFF;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.search-item {
		background-color: #FFFFFF;
		box-shadow: 0rpx 1rpx 13rpx 13rpx #ddd;
		border-radius: 10rpx;
		overflow: hidden;
	}

	.search-item-first {
		padding-top: 120rpx;
	}

	.searchBar-box {
		width: 750rpx;
		height: 100rpx;
		background-color: #FFFFFF;
		position: fixed;
		top: 0rpx;
		left: 0rpx;
		z-index: 999;
	}

	.searchBar-input-placeholder {
		text-align: right;
	}
</style>
